proc msg:disable {nick host handle arg} {
  global botnick 

  set argument [lindex $arg 0]

  if {[string match "#*" $argument]} {
    if {[validchan $argument]} {
      set chan $argument
      set otbn1 [lindex $arg 1]
    } else {
      putquick "NOTICE $nick :\0034ERROR - This bot is not in $argument."
      return 0 
    }
  } else {
    putquick "NOTICE $nick : :\0034ERROR - You need to specify a channel." 
    return 0
  } 

  # if user is not a global operator
  if {![matchattr $handle o]} {
    putquick "NOTICE $nick :\0034ERROR - Permission Denied."
    return 0
  }

  if {![matchattr $handle A]} {
    putquick "NOTICE $nick :\0034ERROR - You need to authenticate first."           
    putquick "NOTICE $nick :\00312You may authenticate yourself by typing \0033\002/msg $botnick auth <your password>\002"
    return 0
  }

  if {[matchattr $handle D]} {
    putquick "NOTICE $nick :\0034ERROR - Permission Denied - Access Is Disabled."
    return 0
  }
  
  disable $nick $handle $host $chan $otbn1
  return 0
}









